home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / basic / BlitzC2P.lha / blitzc2p / demos / chunkyshape5.ascii < prev    next >
Encoding:
Text File  |  1998-09-13  |  11.5 KB  |  618 lines

  1. WBStartup
  2. NoCli
  3.  
  4. ;c2p copy version
  5.  
  6. #c2pBPLX=320 ; chunky operation width
  7. #c2pBPLY=240 ; chunky operation height
  8. #planeheight=240 ; planar display height, must not be smaller than c2pBPLY
  9. #c2pBPLSIZE=(#c2pBPLX*#planeheight)/8
  10.  
  11. #scrwidth=#c2pBPLX
  12. #scrheight=#c2pBPLY
  13.  
  14. #iterations=70 ; iterations to test the addition of each set of objects (not total)
  15.  
  16. objcount.l=200 ; number of objects (must be greater than 0) to start with
  17. #maxobjcount=3000 ; maximum number of objects to do (must be greater than objcount!)
  18. #targetfps=25 ; number of frames per second you want to run at
  19. #objmasking=0 ; Nonzero=masking
  20. #objadd=5 ; number of objects to add each time
  21.  
  22. #objwidth=16 ; minimum of 8
  23. #objheight=16 ; minimum of 1
  24. #objlongwidth=#objwidth/4
  25.  
  26. ; c2p1x1_8_c5_040
  27.  
  28. ; 110% on 040-25
  29.  
  30. Statement c2p040onlyinit{A.l,B.l}
  31. .c2p040onlyinit
  32.   ;A.l=d0=Width.w
  33.   ;B.l=d1=Height.w
  34.  
  35. ; d0.w  chunkyx [chunky-pixels]
  36. ; d1.w  chunkyy [chunky-pixels]
  37. ; d3.w  scroffsy [screen-pixels]
  38.  
  39. c2p1x1_8_c5_040_init
  40.   LEA c2p_datanew(pc),a0
  41.   ANDI.l  #$ffff,d0
  42.   MULU.w  d0,d3
  43.   LSR.l #3,d3
  44.   MOVE.l  d3,c2p_scroffs-c2p_data(a0)
  45.   MULU.w  d0,d1
  46.   MOVE.l  d1,c2p_pixels-c2p_data(a0)
  47. AsmExit
  48. End Statement
  49.  
  50. Statement c2p040only{A.l,B.l}
  51. .c2p040only
  52.   MOVE.l  d0,a0 ; Chunky
  53.   MOVE.l  d1,a1 ; Planar
  54. ; a0  c2pscreen
  55. ; a1  bitplanes
  56.  
  57. c2p1x1_8_c5_040
  58.   MOVEM.l a3-a6,-(a7)
  59.  
  60.   MOVEM.l a0-a1,-(a7)
  61.   LEA c2p_datanew,a0
  62.   LEA c2p_data,a1
  63.   MOVEQ #16-1,d0
  64. _c2pcopy: MOVE.l  (a0)+,(a1)+
  65.   DBF d0,_c2pcopy
  66.   MOVEM.l (a7)+,a0-a1
  67.   MOVE.l  a7,stackstore
  68.   MOVE.l  copybuf(pc),a7
  69.   LEA c2p_data(pc),a2
  70.  
  71.   MOVE.l  c2p_pixels-c2p_data(a2),a3
  72.   ADD.l a0,a3
  73.  
  74.   ADD.w #c2pBPLSIZE,a1
  75.   ADD.l c2p_scroffs-c2p_data(a2),a1
  76.   MOVE.l  a1,a2
  77.   ADD.l #c2pBPLSIZE*4,a2
  78.  
  79.   MOVE.l  (a0),d0
  80.   MOVE.l  (a7)+,(a0)+
  81.   MOVE.l  (a0),d1
  82.   MOVE.l  (a7)+,(a0)+
  83.   MOVE.l  (a0),d2
  84.   MOVE.l  (a7)+,(a0)+
  85.   MOVE.l  (a0),d3
  86.   MOVE.l  (a7)+,(a0)+
  87.   MOVE.l  (a0),d4
  88.   MOVE.l  (a7)+,(a0)+
  89.   MOVE.l  (a0),d5
  90.   MOVE.l  (a7)+,(a0)+
  91.  
  92.   MOVE.l  d4,d7     ; Swap 16x4, part 1
  93.   MOVE.w  d0,d4
  94.   SWAP  d4
  95.   MOVE.w  d4,d0
  96.   MOVE.w  d7,d4
  97.   MOVE.l  d5,d7
  98.   MOVE.w  d1,d5
  99.   SWAP  d5
  100.   MOVE.w  d5,d1
  101.   MOVE.w  d7,d5
  102.  
  103.   MOVE.l  d4,d7     ; Swap 2x4, part 1
  104.   LSR.l #2,d7
  105.   EOR.l d0,d7
  106.   AND.l #$33333333,d7
  107.   EOR.l d7,d0
  108.   LSL.l #2,d7
  109.   EOR.l d7,d4
  110.   MOVE.l  d5,d7
  111.   LSR.l #2,d7
  112.   EOR.l d1,d7
  113.   AND.l #$33333333,d7
  114.   EOR.l d7,d1
  115.   LSL.l #2,d7
  116.   EOR.l d7,d5
  117.  
  118.   MOVE.l  (a0),a5
  119.   MOVE.l  (a7)+,(a0)+
  120.   MOVE.l  (a0),a6
  121.   MOVE.l  (a7)+,(a0)+
  122.  
  123.   EXG d4,a5
  124.   EXG d5,a6
  125.  
  126.   MOVE.l  d4,d7     ; Swap 16x4, part 2
  127.   MOVE.w  d2,d4
  128.   SWAP  d4
  129.   MOVE.w  d4,d2
  130.   MOVE.w  d7,d4
  131.   MOVE.l  d5,d7
  132.   MOVE.w  d3,d5
  133.   SWAP  d5
  134.   MOVE.w  d5,d3
  135.   MOVE.w  d7,d5
  136.  
  137.   MOVE.l  d4,d7     ; Swap 2x4, part 2
  138.   LSR.l #2,d7
  139.   EOR.l d2,d7
  140.   AND.l #$33333333,d7
  141.   EOR.l d7,d2
  142.   LSL.l #2,d7
  143.   EOR.l d7,d4
  144.   MOVE.l  d5,d7
  145.   LSR.l #2,d7
  146.   EOR.l d3,d7
  147.   AND.l #$33333333,d7
  148.   EOR.l d7,d3
  149.   LSL.l #2,d7
  150.   EOR.l d7,d5
  151.  
  152.   MOVE.l  d1,d7     ; Swap 4x1
  153.   LSR.l #4,d7
  154.   EOR.l d0,d7
  155.   AND.l #$0f0f0f0f,d7
  156.   EOR.l d7,d0
  157.   LSL.l #4,d7
  158.   EOR.l d7,d1
  159.   MOVE.l  d3,d7
  160.   LSR.l #4,d7
  161.   EOR.l d2,d7
  162.   AND.l #$0f0f0f0f,d7
  163.   EOR.l d7,d2
  164.   LSL.l #4,d7
  165.   EOR.l d7,d3
  166.  
  167.   BRA _start
  168. _x
  169.   MOVE.l  (a0),d0
  170.   MOVE.l  (a7)+,(a0)+
  171.   MOVE.l  (a0),d1
  172.   MOVE.l  (a7)+,(a0)+
  173.   MOVE.l  (a0),d2
  174.   MOVE.l  (a7)+,(a0)+
  175.   MOVE.l  (a0),d3
  176.   MOVE.l  (a7)+,(a0)+
  177.   MOVE.l  (a0),d4
  178.   MOVE.l  (a7)+,(a0)+
  179.   MOVE.l  (a0),d5
  180.   MOVE.l  (a7)+,(a0)+
  181.  
  182.   MOVE.l  a6,-c2pBPLSIZE(a1)
  183.  
  184.   MOVE.l  d4,d7     ; Swap 16x4, part 1
  185.   MOVE.w  d0,d4
  186.   SWAP  d4
  187.   MOVE.w  d4,d0
  188.   MOVE.w  d7,d4
  189.   MOVE.l  d5,d7
  190.   MOVE.w  d1,d5
  191.   SWAP  d5
  192.   MOVE.w  d5,d1
  193.   MOVE.w  d7,d5
  194.  
  195.   MOVE.l  d4,d7     ; Swap 2x4, part 1
  196.   LSR.l #2,d7
  197.   EOR.l d0,d7
  198.   AND.l #$33333333,d7
  199.   EOR.l d7,d0
  200.   LSL.l #2,d7
  201.   EOR.l d7,d4
  202.   MOVE.l  d5,d7
  203.   LSR.l #2,d7
  204.   EOR.l d1,d7
  205.   AND.l #$33333333,d7
  206.   EOR.l d7,d1
  207.   LSL.l #2,d7
  208.   EOR.l d7,d5
  209.  
  210.   MOVE.l  (a0),d7
  211.   MOVE.l  (a7)+,(a0)+
  212.   MOVE.l  (a0),a6
  213.   MOVE.l  (a7)+,(a0)+
  214.  
  215.   MOVE.l  a5,-c2pBPLSIZE(a2)
  216.  
  217.   MOVE.l  d7,a5
  218.   EXG d4,a5
  219.   EXG d5,a6
  220.  
  221.   MOVE.l  d4,d7     ; Swap 16x4, part 2
  222.   MOVE.w  d2,d4
  223.   SWAP  d4
  224.   MOVE.w  d4,d2
  225.   MOVE.w  d7,d4
  226.   MOVE.l  d5,d7
  227.   MOVE.w  d3,d5
  228.   SWAP  d5
  229.   MOVE.w  d5,d3
  230.   MOVE.w  d7,d5
  231.  
  232.   MOVE.l  d4,d7     ; Swap 2x4, part 2
  233.   MOVE.l  d6,(a2)+
  234.   LSR.l #2,d7
  235.   EOR.l d2,d7
  236.   AND.l #$33333333,d7
  237.   EOR.l d7,d2
  238.   LSL.l #2,d7
  239.   EOR.l d7,d4
  240.   MOVE.l  d5,d7
  241.   LSR.l #2,d7
  242.   EOR.l d3,d7
  243.   AND.l #$33333333,d7
  244.   EOR.l d7,d3
  245.   LSL.l #2,d7
  246.   EOR.l d7,d5
  247.  
  248.   MOVE.l  d1,d7     ; Swap 4x1
  249.   LSR.l #4,d7
  250.   EOR.l d0,d7
  251.   MOVE.l  a4,(a1)+
  252.   AND.l #$0f0f0f0f,d7
  253.   EOR.l d7,d0
  254.   LSL.l #4,d7
  255.   EOR.l d7,d1
  256.   MOVE.l  d3,d7
  257.   LSR.l #4,d7
  258.   EOR.l d2,d7
  259.   AND.l #$0f0f0f0f,d7
  260.   EOR.l d7,d2
  261.   LSL.l #4,d7
  262.   EOR.l d7,d3
  263. _start
  264.  
  265.   MOVE.l  d2,d7     ; Swap 8x2, part 1
  266.   LSR.l #8,d7
  267.   EOR.l d0,d7
  268.   AND.l #$00ff00ff,d7
  269.   EOR.l d7,d0
  270.   LSL.l #8,d7
  271.   EOR.l d7,d2
  272.   MOVE.l  d2,d7
  273.   LSR.l #1,d7     ; Swap 1x2, part 1
  274.   EOR.l d0,d7
  275.   AND.l #$55555555,d7
  276.   EOR.l d7,d0
  277.   MOVE.l  d0,c2pBPLSIZE*2(a2)
  278.   ADD.l d7,d7
  279.   EOR.l d7,d2
  280.   MOVE.l  d3,d7     ; Swap 8x2, part 2
  281.   LSR.l #8,d7
  282.   EOR.l d1,d7
  283.   AND.l #$00ff00ff,d7
  284.   EOR.l d7,d1
  285.   LSL.l #8,d7
  286.   EOR.l d7,d3
  287.   MOVE.l  d3,d7
  288.   LSR.l #1,d7     ; Swap 1x2, part 2
  289.   EOR.l d1,d7
  290.   AND.l #$55555555,d7
  291.   EOR.l d7,d1
  292.   MOVE.l  d1,c2pBPLSIZE*2(a1)
  293.   ADD.l d7,d7
  294.   EOR.l d7,d3
  295.  
  296.   MOVE.l  d5,d7
  297.   LSR.l #4,d7
  298.   EOR.l d4,d7
  299.   AND.l #$0f0f0f0f,d7
  300.   EOR.l d7,d4
  301.   LSL.l #4,d7
  302.   EOR.l d7,d5
  303.  
  304.   EXG d4,a5
  305.   EXG d5,a6
  306.  
  307.   MOVE.l  d5,d7
  308.   LSR.l #4,d7
  309.   EOR.l d4,d7
  310.   AND.l #$0f0f0f0f,d7
  311.   EOR.l d7,d4
  312.   LSL.l #4,d7
  313.   EOR.l d7,d5
  314.  
  315.   MOVE.l  a5,d0
  316.   MOVE.l  a6,d1
  317.   MOVE.l  d2,c2pBPLSIZE(a2)
  318.  
  319.   MOVE.l  d0,d7     ; Swap 8x2, part 3
  320.   LSR.l #8,d7
  321.   EOR.l d4,d7
  322.   AND.l #$00ff00ff,d7
  323.   EOR.l d7,d4
  324.   LSL.l #8,d7
  325.   EOR.l d7,d0
  326.   MOVE.l  d0,d7
  327.   LSR.l #1,d7     ; Swap 1x2, part 3
  328.   EOR.l d4,d7
  329.   AND.l #$55555555,d7
  330.   EOR.l d7,d4
  331.   ADD.l d7,d7
  332.   EOR.l d7,d0
  333.   MOVE.l  d1,d7     ; Swap 8x2, part 4
  334.   LSR.l #8,d7
  335.   MOVE.l  d3,c2pBPLSIZE(a1)
  336.   EOR.l d5,d7
  337.   AND.l #$00ff00ff,d7
  338.   EOR.l d7,d5
  339.   LSL.l #8,d7
  340.   EOR.l d7,d1
  341.   MOVE.l  d1,d7
  342.   LSR.l #1,d7     ; Swap 1x2, part 4
  343.   EOR.l d5,d7
  344.   AND.l #$55555555,d7
  345.   EOR.l d7,d5
  346.   ADD.l d7,d7
  347.   EOR.l d7,d1
  348.  
  349.   MOVE.l  d0,a5
  350.   MOVE.l  d1,a6
  351.  
  352.   MOVE.l  d4,d6
  353.   MOVE.l  d5,a4
  354.  
  355.   CMP.l a0,a3
  356.   BNE _x
  357.  
  358.   MOVE.l  a6,-c2pBPLSIZE(a1)
  359.   MOVE.l  a5,-c2pBPLSIZE(a2)
  360.   MOVE.l  d6,(a2)+
  361.   MOVE.l  a4,(a1)+
  362.   MOVE.l  stackstore(pc),a7
  363.   MOVEM.l (a7)+,a3-a6
  364. AsmExit
  365.  
  366.   Even4
  367. copybuf:  Dc.l 0
  368. stackstore: Dc.l 0
  369. c2p_data
  370. c2p_scroffs: Dc.l 0
  371. c2p_pixels: Dc.l 0
  372.   Ds.l  16
  373.   Even4
  374. c2p_datanew
  375.   Ds.l  16
  376. End Statement
  377.  
  378. Statement chunkyshape1{A.l,B.l,C.l,D.l,E.l}
  379. .chunkyshape1
  380. ;any position masked with mask data and movement table
  381.   MOVEM.l a3-a6,-(a7)
  382.   MOVE.l  d4,d7 ; object loop
  383.   SUBQ.l  #1,d7
  384.   MOVE.l  d3,a3 ; base of table
  385.   MOVE.l  d0,a4 ; store
  386.   MOVE.l  d1,a5 ; store
  387.   MOVE.l  d2,a6 ; store
  388. objloop
  389.  
  390.   MOVEQ.l #0,d3
  391.   MOVE.w  (a3),d3
  392.   MOVEQ.l #0,d5
  393.   MOVEQ.l #0,d6
  394.   MOVE.w  4(a3),d5
  395.   MOVE.w  6(a3),d6
  396.   CMP.w   #6,d3 ; x<6?
  397.   BLE     xle
  398.   CMP.w   #scrwidth-objwidth-6,d3
  399.   BLT     xskip
  400. xle
  401.   EXG.l   d5,d6
  402. xskip
  403.   EXT.l   d5
  404.   ADD.l   d5,d3
  405.   MOVE.w  d3,(a3)
  406.   MOVE.w  d5,4(a3)
  407.   MOVE.w  d6,6(a3)
  408.  
  409.   MOVEQ.l #0,d4
  410.   MOVE.w  2(a3),d4
  411.   MOVEQ.l #0,d5
  412.   MOVEQ.l #0,d6
  413.   MOVE.w  8(a3),d5
  414.   MOVE.w  10(a3),d6
  415.   CMP.w   #6,d4 ; y<6?
  416.   BLE     yle
  417.   CMP.w   #scrheight-objheight-6,d4
  418.   BLT     yskip
  419. yle
  420.   EXG.l   d5,d6
  421. yskip
  422.   EXT.l   d5
  423.   ADD.l   d5,d4
  424.   MOVE.w  d4,2(a3)
  425.   MOVE.w  d5,8(a3)
  426.   MOVE.w  d6,10(a3)
  427.  
  428.   ADD.l   #12,a3
  429.   MULU    #scrwidth,d4
  430.   MOVE.l  a4,a0 ; input
  431.   ADD.l   d3,d4
  432.   MOVE.l  a5,a2 ; mask
  433.   MOVE.l  a6,d2
  434.   ADD.l   d4,d2 ; output
  435.   MOVE.l  d2,a1 ; output
  436.   MOVE.l  #objheight-1,d2
  437.   MOVE.l  #scrwidth-objwidth,d3
  438. ;Do masked blit
  439. yloop
  440.     MOVEQ.l #objlongwidth-1,d4
  441. xloop
  442.       MOVE.l  (a2)+,d0
  443.       AND.l   d0,(a1)
  444.       MOVE.l  (a0)+,d1
  445.       OR.l    d1,(a1)+
  446.       DBRA    d4,xloop
  447.     ADD.l   d3,a1
  448.     DBRA    d2,yloop
  449.   DBRA    d7,objloop
  450.   MOVEM.l (a7)+,a3-a6
  451. AsmExit
  452. End Statement
  453.  
  454. Statement chunkyshape2{A.l,B.l,C.l,D.l,E.l}
  455. .chunkyshape2
  456. ;any position unmasked with mask data and movement table
  457. ;B.l is unused in this routine
  458.   MOVEM.l a3-a6,-(a7)
  459.   MOVE.l  d4,d7 ; object loop
  460.   SUBQ.l  #1,d7
  461.   MOVE.l  d3,a3 ; base of table
  462.   MOVE.l  d0,a4 ; store
  463. ;  MOVE.l  d1,a5 ; store
  464.   MOVE.l  d2,a6 ; store
  465. objloop2
  466.  
  467.   MOVEQ.l #0,d3
  468.   MOVE.w  (a3),d3
  469.   MOVEQ.l #0,d5
  470.   MOVEQ.l #0,d6
  471.   MOVE.w  4(a3),d5
  472.   MOVE.w  6(a3),d6
  473.   CMP.w   #6,d3 ; x<6?
  474.   BLE     xle2
  475.   CMP.w   #scrwidth-objwidth-6,d3
  476.   BLT     xskip2
  477. xle2
  478.   EXG.l   d5,d6
  479. xskip2
  480.   EXT.l   d5
  481.   ADD.l   d5,d3
  482.   MOVE.w  d3,(a3)
  483.   MOVE.w  d5,4(a3)
  484.   MOVE.w  d6,6(a3)
  485.  
  486.   MOVEQ.l #0,d4
  487.   MOVE.w  2(a3),d4
  488.   MOVEQ.l #0,d5
  489.   MOVEQ.l #0,d6
  490.   MOVE.w  8(a3),d5
  491.   MOVE.w  10(a3),d6
  492.   CMP.w   #6,d4 ; y<6?
  493.   BLE     yle2
  494.   CMP.w   #scrheight-objheight-6,d4
  495.   BLT     yskip2
  496. yle2
  497.   EXG.l   d5,d6
  498. yskip2
  499.   EXT.l   d5
  500.   ADD.l   d5,d4
  501.   MOVE.w  d4,2(a3)
  502.   MOVE.w  d5,8(a3)
  503.   MOVE.w  d6,10(a3)
  504.  
  505.   ADD.l   #12,a3
  506.   MULU    #scrwidth,d4
  507.   MOVE.l  a4,a0 ; input
  508.   ADD.l   d3,d4
  509. ;  MOVE.l  a5,a2 ; mask
  510.   MOVE.l  a6,d2
  511.   ADD.l   d4,d2 ; output
  512.   MOVE.l  d2,a1 ; output
  513.   MOVE.l  #objheight-1,d2
  514.   MOVE.l  #scrwidth-objwidth,d3
  515. ;Do unmasked blit
  516. yloop2
  517.     MOVEQ.l #objlongwidth-1,d4
  518. xloop2
  519.       MOVE.l  (a0)+,(a1)+
  520.       DBRA    d4,xloop2
  521.     ADD.l   d3,a1
  522.     DBRA    d2,yloop2
  523.   DBRA    d7,objloop2
  524.   MOVEM.l (a7)+,a3-a6
  525. AsmExit
  526. End Statement
  527.  
  528. .blitzprogram
  529. ; Setup
  530. InitBank 1,#scrwidth*#scrheight,$10000 ; Fastram chunky buffer
  531. InitBank 4,#scrwidth*#scrheight,$10000 ; Background buffer
  532. GetReg d0,Bank(4)
  533. MOVE.l d0,copybuf
  534. BLoad "320x256x256.chunky",Bank(4),#scrwidth*#scrheight
  535. LoadPalette 0,"320x256x256.palette"
  536. VWait
  537. InitBank 0,(#scrwidth*Max(#planeheight,#c2pBPLY))+1000,2|65536 ; Chipram planar buffer
  538. CludgeBitMap 0,#scrwidth,Max(#planeheight,#c2pBPLY),8,Bank(0)
  539. Screen 0,0,0,#scrwidth,Max(#planeheight,#c2pBPLY),8,0,"c2p test",0,0,0
  540. Use Palette 0
  541. VWait 50
  542.  
  543. ; chunky shape
  544. InitBank 2,#objwidth*#objheight,$10000 ; chunky shape
  545. cstep.q=256/(#objwidth*#objheight)
  546. c.q=0
  547. For o.l=0 To (#objwidth*#objheight)-1
  548.   NPokeB Bank(2)+o,255-c
  549.   c+cstep
  550. Next o
  551. If #objmasking<>0
  552.   CacheClearU_
  553.   For o.l=0 To #objwidth*#objheight
  554.     p3.l=Bank(2)+Rnd(#objwidth*#objheight)-1
  555.     NPokeB p3,$00
  556.   Next o
  557. EndIf
  558.  
  559. ; chunky mask
  560. InitBank 3,#objwidth*#objheight,$10000 ; chunky mask
  561. For o.l=0 To (#objwidth*#objheight)-1
  562.   If NPeekB(Bank(2)+o)=0 Then NPokeB Bank(3)+o,$ff Else NPokeB Bank(3)+o,$0
  563. Next o
  564.  
  565. ; movement table
  566. InitBank 5,#maxobjcount*12,$10000 ; table
  567. For o.l=0 To (#maxobjcount-1)*12 Step 12
  568.   p1.w=6+Rnd(#scrwidth-#objwidth-14)
  569.   p2.w=6+Rnd(#scrheight-#objheight-14)
  570.   NPokeW Bank(5)+o,p1
  571.   NPokeW Bank(5)+o+2,p2
  572.   Repeat:xmove.w=Rnd(3)-Rnd(6):Until xmove<>0
  573.   Repeat:ymove.w=Rnd(3)-Rnd(6):Until ymove<>0
  574.   NPokeW Bank(5)+o+4,xmove
  575.   NPokeW Bank(5)+o+6,-xmove
  576.   NPokeW Bank(5)+o+8,ymove
  577.   NPokeW Bank(5)+o+10,-ymove
  578. Next o
  579.  
  580. ; Do the c2p test
  581. c2p040onlyinit{#scrwidth,#scrheight}
  582. CacheClearU_
  583. Forbid_
  584. VWait
  585. While Joyb(0)=0
  586.   If #objmasking<>0
  587.     ResetTimer
  588.     For time=1 To #iterations
  589.       chunkyshape1{Bank(2),Bank(3),Bank(1),Bank(5),objcount}
  590.       c2p040only{Bank(1),Bank(0)} ; Convert chunky to planar
  591.     Next time
  592.     t=Ticks
  593.   Else
  594.     ResetTimer
  595.     For time=1 To #iterations
  596.       chunkyshape2{Bank(2),Bank(3),Bank(1),Bank(5),objcount}
  597.       c2p040only{Bank(1),Bank(0)} ; Convert chunky to planar
  598.     Next time
  599.     t=Ticks
  600.   EndIf
  601.   fps.q=50/(t/#iterations)
  602.   If (fps>#targetfps) AND (objcount<=(#maxobjcount-#objadd)) Then objcount+#objadd Else Goto skipwend
  603. Wend
  604. skipwend:
  605. VWait 2 : Permit_
  606. VWait 20
  607. FindScreen 0
  608. Window 0,0,11,640,100,0,"Test results for c2p",0,0
  609. WindowOutput 0
  610. NPrint "Routine performed @",#targetfps,"(",fps,")fps, doing ",objcount," ",#objwidth,"x",#objheight," objects."
  611. NPrint " "
  612. NPrint "Press mousebutton..."
  613. Free Screen 0
  614. MouseWait
  615. Free Window 0
  616. End
  617.  
  618.